interface IUSer {
  userName: string;
  password: string;
  phone: number;
  login: () => void;
}

// 类装饰器
function TestClass1(target: any, discriptor: any) {
  console.log("类装饰器1");
  target();
  console.log("类装饰器1");
}
@TestClass1
class User implements IUSer {
  userName;
  password;
  phone;
  constructor(userName: string, password: string, phone: number) {
    console.log("执行");

    this.userName = userName;
    this.password = password;
    this.phone = phone;
  }
  login() {
    console.log("我成功登录了", this.userName);
  }
}
